package sy.services.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import sy.db.mysql.dao.TuserTroleDao;
import sy.db.mysql.model.TuserTrole;
import sy.pageModel.DataGrid;
import sy.services.TuserTroleServiceI;

@Service
public class TuserTroleServiceImpl  implements TuserTroleServiceI{
	
	@Autowired
	public TuserTroleDao tuserTroleDao;
	@Override
	public int deleteByPrimaryKey(String id) {
		return tuserTroleDao.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(TuserTrole record) {
		return tuserTroleDao.insertSelective(record);
	}

	@Override
	public TuserTrole selectByPrimaryKey(String id) {
		return tuserTroleDao.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(TuserTrole record) {
		return tuserTroleDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public DataGrid findbyByGrid(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List<TuserTrole> retList = this.tuserTroleDao.findbyByGrid(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

	@Override
	public DataGrid dataGridje(Map map) {
		DataGrid dataGrid = new DataGrid();
		map.put("dataGrid", dataGrid);
		List retList = this.tuserTroleDao.findbyByGridjuese(map);
		dataGrid.setRows(retList);
		return dataGrid;
	}

}
